<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../tf-imports/plottable.html">
<link rel="import" href="../tf-imports/lodash.html">

<!--
tf-data-coordinator is a simple plumbing component that takes in a value url generator
(a function that takes a tag and a run and returns a url), and produces an upward-bindable
TF.DataCoordinator for consumption elsewhere.
-->
<dom-module id="tf-data-coordinator">
  <script src="dataCoordinator.js"></script>
  <script src="dataset.js"></script>
  <script>
    Polymer({
      is: "tf-data-coordinator",
      properties: {
        urlGenerator: Object,
        outDataCoordinator: {
          type: Object,
          computed: "getCoordinator(urlGenerator, runToTag)",
          notify: true,
        },
      },
      getCoordinator: function(generator, runToTag) {
        return new TF.DataCoordinator(generator, runToTag);
      }
    });
  </script>
</dom-module>
